﻿#ifndef CMDTHREEDCLOUDMAPSIDEBARNAMEITEMRENAME_H
#define CMDTHREEDCLOUDMAPSIDEBARNAMEITEMRENAME_H

#include "CommandManager/CommandBase.h"

namespace PostCommand
{
    class CmdThreeDCloudMapSidebarNameItemRename : public CommandManager::CommandBase
    {
        Q_OBJECT

    public:
        CmdThreeDCloudMapSidebarNameItemRename();
        ~CmdThreeDCloudMapSidebarNameItemRename();

        bool execute() override;
        void undo() override;
        void redo() override;

        void setArgs(int windowId, int itemIndex, QString newName)
        {
            m_windowId = windowId;
            m_itemIndex = itemIndex;
            m_newName = newName;
        }

    private:
        int m_windowId;
        int m_itemIndex;
        QString m_newName;
    };
}

#endif // !CMDTHREEDCLOUDMAPSIDEBARNAMEITEMRENAME_H

